package ${package.Entity};

<#list table.importPackages as pkg>
import ${pkg};
</#list>
import javax.persistence.Column;

<#if cfg.entityLombokModel>
import com.chehejia.framework.persistence.domain.IntegerDomain;
import lombok.*;

</#if>

<#if entitySerialVersionUID>
import java.io.Serializable;
</#if>

/**
 * <p>
 * ${table.comment!}
 * </p>
 *
 * @author ${author}
 * @since ${date}
 */
<#if cfg.entityLombokModel>
@Data
@Builder
@NoArgsConstructor
@AllArgsConstructor
</#if>
@Table(name = "${table.name}")
public class ${entity} extends IntegerDomain implements Serializable{

<#if entitySerialVersionUID>
    private static final long serialVersionUID = 1L;
</#if>
<#-- ----------  BEGIN 字段循环遍历  ---------->
<#list table.fields as field>
    <#if field.propertyName == "id">

    <#else>
        <#if field.comment!?length gt 0>
        /**
        * ${field.comment}
        */
        </#if>
        @Column(name = "${field.name}")
        private ${field.propertyType} ${field.propertyName};

    </#if>
</#list>
<#------------  END 字段循环遍历  ---------->
<#if cfg.entityColumnConstant>
    public class Fields {
        <#list table.fields as field>
        public static final String ${field.name?upper_case} = "${field.propertyName}";

        </#list>
    }
</#if>
}
